home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
man
/
cat.n
/
glob.n
< prev
next >
Wrap
Text File
|
1995-07-25
|
4KB
|
133 lines
gggglllloooobbbb((((nnnn)))) TTTTccccllll ((((7777....0000)))) gggglllloooobbbb((((nnnn))))
_________________________________________________________________
NNNNAAAAMMMMEEEE
glob - Return names of files that match patterns
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
gggglllloooobbbb ?_s_w_i_t_c_h_e_s? _p_a_t_t_e_r_n ?_p_a_t_t_e_r_n ...?
_________________________________________________________________
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
This command performs file name ``globbing'' in a fashion
similar to the csh shell. It returns a list of the files
whose names match any of the _p_a_t_t_e_r_n arguments.
If the initial arguments to gggglllloooobbbb start with ---- then they are |
treated as switches. The following switches are currently |
supported: |
----nnnnooooccccoooommmmppppllllaaaaiiiinnnn ||
Allows an empty list to be returned without |
error; without this switch an error is |
returned if the result list would be empty. |
-------- ||
Marks the end of switches. The argument |
following this one will be treated as a |
_p_a_t_t_e_r_n even if it starts with a ----....
The _p_a_t_t_e_r_n arguments may contain any of the following
special characters:
???? Matches any single character.
**** Matches any sequence of zero or more characters.
[[[[_c_h_a_r_s]]]] Matches any single character in _c_h_a_r_s. If _c_h_a_r_s
contains a sequence of the form _a----_b then any
character between _a and _b (inclusive) will match.
\\\\_x Matches the character _x.
{{{{_a,,,,_b,,,,...} Matches any of the strings _a, _b, etc.
As with csh, a ``.'' at the beginning of a file's name or
just after a ``/'' must be matched explicitly or with a {}
construct. In addition, all ``/'' characters must be
matched explicitly.
If the first character in a _p_a_t_t_e_r_n is ``~'' then it refers
to the home directory for the user whose name follows the
``~''. If the ``~'' is followed immediately by ``/'' then
Page 1 (printed 7/17/95)
gggglllloooobbbb((((nnnn)))) TTTTccccllll ((((7777....0000)))) gggglllloooobbbb((((nnnn))))
the value of the HOME environment variable is used.
The gggglllloooobbbb command differs from csh globbing in two ways.
First, it does not sort its result list (use the llllssssoooorrrrtttt
command if you want the list sorted). Second, gggglllloooobbbb only |
returns the names of files that actually exist; in csh no |
check for existence is made unless a pattern contains a ?, |
*, or [] construct.
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
exist, file, glob, pattern
Page 2 (printed 7/17/95)